package org.liveboardgames.agricola.control.delegates.action.overrideaction
{
	import org.liveboardgames.agricola.model.enums.ActionOutputEnum;
	import org.liveboardgames.agricola.vo.action.Action;
	import org.liveboardgames.agricola.vo.common.Target;

	public class ActionOverrideFactory
	{

		public static function getActionOverride(action:Action, target:Target):ActionOverride
		{
			var actionOverride:ActionOverride = null;

			var actionOutput:String = action.actionOutput;
			if (ActionOutputEnum.RENOVATION_TO_CLAY == actionOutput)
			{
				actionOverride = new RenovationToClayActionOverride(action, target);
			}
			else if (ActionOutputEnum.RENOVATION_TO_STONE == actionOutput)
			{
				actionOverride = new RenovationToStoneActionOverride(action, target);
			}
			else
			{
				//trace("No override for action " + action);
			}

			return actionOverride;
		}
	}
}